package com.wpp;

import org.junit.Test;

import java.time.LocalDate;
import java.time.LocalDateTime;

public class LocalTime {

    @Test
    public void test() {


        //获取当前日期时间
        LocalDate now = LocalDate.now();
        java.time.LocalTime now1 = java.time.LocalTime.now();
        LocalDateTime now2 = LocalDateTime.now();
        System.out.println(now);
        System.out.println(now1);
        System.out.println(now2);
        //设置指定日期of()，没有偏移量，而Calendar有偏移量
        LocalDateTime of = LocalDateTime.of(2021, 10, 3, 10, 13, 21);
        System.out.println(of);

        //获取时间
        //设置时间都有问题，后续解决    withDayOfMonth ---  getMinute
    }
}
